Use LinearizationOpPoint for trajectory_ss#82
Open
baggepinnen wants to merge 5 commits intomasterfrom
Open
Conversation
Replace manual operating point extraction in `trajectory_ss` with MTK's `LinearizationOpPoint` API (SciML/ModelingToolkit.jl#4443). This removes the fragile `robust_sol_getindex` helper and simplifies the implementation. - Use `_build_op_from_solution` to extract differential states + parameters - Supplement with linearization system unknowns from the solution - Remove `robust_sol_getindex` (no longer needed) - Bump version to 2.7.0, require MTK >= 11.7 - Update docs narrative for trajectory_ss Closes SciML/ModelingToolkit.jl#4159 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nOpPoint directly trajectory_ss now delegates entirely to MTK's linearize with LinearizationOpPoint(sol, t) — no manual op construction needed. Removed ControlSystemsMTK.fuzz and all references to it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trajectory_sswith MTK'sLinearizationOpPointAPI (feat: [AI] allow passing an operating point tolinearizeusing a solution SciML/ModelingToolkit.jl#4443)robust_sol_getindexhelper function (~40 lines)Details
trajectory_sspreviously usedrobust_sol_getindexto manually extract operating points from ODE solutions. This was brittle and hard to maintain (SciML/ModelingToolkit.jl#4159). The new approach uses_build_op_from_solution(LinearizationOpPoint(sol, t))to let MTK handle the extraction, supplemented with linearization system unknowns from the solution for completeness.Note: The MTK PR has a dispatch ambiguity bug in the vector
_build_op_from_solutionpath, so we use the scalar path in a loop as a workaround. The vector path inlinearizealso has initialization issues withloop_openings— we work around this by passinginitialize=falsesince the operating points are fully specified from the solution.Test plan
test/test_batchlin.jlpasses (batch_ss, GainScheduledStateSpace, trajectory_ss)batch_linearization.mdtrajectory_ss calls succeed🤖 Generated with Claude Code